package com.fuyao.cloud.asset.vo.card;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 资产分类导出类
 *
 * @author lyhil
 * @date 2021/11/17
 */
@Data
@ColumnWidth(25)
@ApiModel(value = "资产信息导出类")
public class AssetCardExcelVO {

    @ExcelProperty(value = "资产名称")
    private String name;

    @ExcelProperty(value = "父类资产名称")
    private String parentName;

    @ExcelProperty(value = "资产编号")
    private String parentNumber;

    @ExcelProperty(value = "资产状态")
    private String status;

    @ExcelProperty(value = "资产类别")
    private String ctiName;

    @ExcelProperty(value = "规格型号")
    private String model;

    @ExcelProperty(value = "SN号")
    private String sn;

    @ExcelProperty(value = "计量单位")
    private String unit;

    @ExcelProperty(value = "金额")
    private BigDecimal amount;

    @ExcelProperty(value = "使用部门")
    private String usedept;

    @ExcelProperty(value = "使用人")
    private String useName;

    @ExcelProperty(value = "存放地点")
    private String location;

    @ExcelProperty(value = "购入日期")
    private LocalDate buyDate;

    @ExcelProperty(value = "供 应 商")
    private String supplier;

    @ExcelProperty(value = "供应商联系人")
    private String supplierUser;

    @ExcelProperty(value = "供应商联系电话")
    private String supplierPhone;

    @ExcelProperty(value = "使用期限")
    private BigDecimal usefulLife;

    @ExcelProperty(value = "型号名称")
    private String sauName;

    @ExcelProperty(value = "英文名称")
    private String enName;

    @ExcelProperty(value = "资产别名")
    private String alias;

    @ExcelProperty(value = "会计凭证号")
    private String voucherNo;

    @ExcelProperty(value = "所属单位")
    private String belongdept;

    @ExcelProperty(value = "合 同 号")
    private String contractNumber;

    @ExcelProperty(value = "原    值")
    private BigDecimal originalAmount;

    @ExcelProperty(value = "累计折旧")
    private BigDecimal depreciation;

    @ExcelProperty(value = "货币单位")
    private String monetaryUnit;

    @ExcelProperty(value = "生 产 厂")
    private String maker;

    @ExcelProperty(value = "品牌")
    private String brand;

    @ExcelProperty(value = "维保到期时间")
    private LocalDate maintenanceDate;

    @ExcelProperty(value = "保修截止日期")
    private LocalDate guaranteeDate;

    @ExcelProperty(value = "出厂日期")
    private LocalDate factoryDate;

    @ExcelProperty(value = "建档日期")
    private LocalDate recordDate;

    @ExcelProperty(value = "取得日期")
    private LocalDate acquireDate;

    @ExcelProperty(value = "始用日期")
    private LocalDate useDate;

    @ExcelProperty(value = "报废日期")
    private LocalDate scrapDate;

    @ExcelProperty(value = "经费来源")
    private String fundsSource;

    @ExcelProperty(value = "采购方式")
    private String purchaseMode;

    @ExcelProperty(value = "固定资产")
    private String fixedAssets;


    @ExcelProperty(value = "使用单位全名称")
    private String parentUseunitname;

    @ExcelProperty(value = "存放地全称")
    private String parentStorageplace;


    @ExcelProperty(value = "资产类别全名称")
    private String classified;

    @ExcelProperty(value = "资产类别全编码")
    private String classifiedCode;

    @ExcelProperty(value = "资产编码")
    private String number;


    @ExcelProperty(value = "存放地点类型")
    private String locationType;

    @ExcelProperty(value = "来源")
    private String source;

    @ExcelProperty(value = "取得方式")
    private String acquireWay;

    @ExcelProperty(value = "使用方式")
    private String usageOption;

    @ExcelProperty(value = "功能描述")
    private String description;

    @ExcelProperty(value = "备注")
    private String remarks;

    public String getFixedAssets() {
        return ("0".equals(this.fixedAssets) ? "不是" : "是");
    }

    @ExcelIgnore
    private String maintenanceInfo;
}
